<!DOCTYPE html>
<script>function heartShape(msg = "Merry Christmas") {
    let lines = [];
    for (let y = 15; y > -15; y--) {
      let line = "";
      for (let x = -30; x < 30; x++) {
        let f = Math.pow((Math.pow(x * 0.05, 2) + Math.pow(y * 0.1, 2) - 1), 3) - Math.pow(x * 0.05, 2) * Math.pow(y * 0.1, 3);
        line += f <= 0 ? msg[(x - y) % msg.length] : " ";
      }
      lines.push(line);
    }
    console.log(lines.join("\n"));
  }

  heartShape();</script>